A video matting model I built in PyTorch for separating a foreground subject and alpha matte from green-screen footage. This project was started collaboratively in the Corridor Creates discord server where work is still ongoing. This is my own itteration of an idea, not representative of CorridorKey nor other ideas being itterated on.
Technologies
How does it work?
The model combines global context from a downscaled frame with native-resolution 1024 by 1024 tiles. Spatial and temporal attention track the subject across frames, while a final detail refiner corrects the predicted alpha, foreground, and green spill around fine edges.
Why use tiled inference?
Full-resolution video needs a lot of GPU memory. Tiling keeps that cost manageable, but a tile alone cannot see the whole subject. I kept a separate full-frame context branch and merged overlapping tile predictions so the model can use both local detail and the wider scene.